
package com.shop.cloud.mall.api.controller;

import com.shop.cloud.common.core.util.R;
import com.shop.cloud.common.data.tenant.TenantContextHolder;
import com.shop.cloud.mall.api.service.DistributionConfigService;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 分销员
 *
 * @author
 * @date 2021-04-25 17:40:35
 */
@Slf4j
@RestController
@AllArgsConstructor
@RequestMapping("/distributionconfig")
@Tag(description = "distributionconfig", name = "分销设置API")
public class DistributionConfigController {

	private final DistributionConfigService distributionConfigService;

	/**
	 * 查询积分设置
	 * @return R
	 */
	@Operation(summary = "查询分销设置")
	@GetMapping()
	public R get() {
		return R.ok(distributionConfigService.getByTenantId(TenantContextHolder.getTenantId()));
	}

}
